﻿using System;
using System.Runtime.Serialization;

namespace OCXS.OCXSServiceLibrary.OPCXMLDA10 {

    [DataContract(Namespace = "http://opcfoundation.org/webservices/XMLDA/1.0/")]
    public class OPCQuality : System.ComponentModel.INotifyPropertyChanged {

        private qualityBits qualityFieldField;

        private limitBits limitFieldField;

        private byte vendorFieldField;

        public OPCQuality() {
            this.qualityFieldField = qualityBits.good;
            this.limitFieldField = limitBits.none;
            this.vendorFieldField = ((byte)(0));
        }

        [DataMember(Order = 0)]
        public qualityBits QualityField {
            get {
                return this.qualityFieldField;
            }
            set {
                this.qualityFieldField = value;
                this.RaisePropertyChanged("QualityField");
            }
        }

        [DataMember(Order = 1)]
        public limitBits LimitField {
            get {
                return this.limitFieldField;
            }
            set {
                this.limitFieldField = value;
                this.RaisePropertyChanged("LimitField");
            }
        }

        [DataMember(Order = 2)]
        public byte VendorField {
            get {
                return this.vendorFieldField;
            }
            set {
                this.vendorFieldField = value;
                this.RaisePropertyChanged("VendorField");
            }
        }

        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;

        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
